<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/inventoryinfo/goods_inventory_warehouse_xm/q_goods_inventory_warehouse_xm.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/inventoryinfo/goods_inventory_warehouse_xm/q_goods_inventory_warehouse_xm.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '库位商品库存明细',
                name: 'goods_inventory_warehouse_xm/q_goods_inventory_warehouse_xm',
                url: "/q_goods_inventory_warehouse_xm/",
                sortName: "库位,编码"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"库位":"","编码":"","名称":"","建议售价":[null,null],"可用数量":[null,null],"修改日期":""});
            const searchFormOptions = ref([[{"dataKey":"库位编码","data":[],"title":"库位","field":"库位","type":"select"},{"title":"编码","field":"编码","type":"like"},{"title":"名称","field":"名称","type":"like"}],[{"title":"建议售价","field":"建议售价","type":"range"},{"title":"可用数量","field":"可用数量","type":"range"},{"title":"最后入库时间","field":"修改日期","type":"date"}]]);
            const columns = ref([{field:'库位',title:'库位',type:'string',bind:{ key:'库位编码',data:[]},width:80,align:'left',sort:true},
                       {field:'上级库位',title:'上级仓库',type:'guid',bind:{ key:'所有仓库',data:[]},width:110,hidden:true,align:'left'},
                       {field:'库位名称',title:'库位名称',type:'string',width:100,hidden:true,align:'left'},
                       {field:'编码',title:'编码',type:'string',width:60,align:'left'},
                       {field:'名称',title:'名称',type:'string',width:150,align:'left'},
                       {field:'品牌',title:' 品牌',type:'string',width:50,align:'left'},
                       {field:'单位',title:'单位',type:'string',bind:{ key:'商品单位',data:[]},width:50,align:'left'},
                       {field:'规格',title:'规格',type:'string',width:60,align:'left'},
                       {field:'货号',title:'货号',type:'string',width:50,hidden:true,align:'left'},
                       {field:'采购价',title:'采购价',type:'decimal',width:80,hidden:true,align:'left'},
                       {field:'最低售价',title:'最低售价',type:'decimal',width:80,hidden:true,align:'left'},
                       {field:'建议售价',title:'建议售价',type:'decimal',width:80,align:'left'},
                       {field:'条码',title:'条码',type:'string',width:80,hidden:true,align:'left'},
                       {field:'成本价',title:'成本价',type:'decimal',width:80,hidden:true,align:'left'},
                       {field:'无税成本',title:'无税成本价',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'数量',title:'库存数量',type:'float',width:80,require:true,align:'left'},
                       {field:'审核中数量',title:'审核中数量',type:'float',width:110,require:true,align:'left'},
                       {field:'可用数量',title:'可用数量',type:'float',width:80,require:true,align:'left'},
                       {field:'金额',title:'库存金额',type:'decimal',width:80,hidden:true,require:true,align:'left'},
                       {field:'无税金额',title:'无税库存金额',type:'decimal',width:110,hidden:true,require:true,align:'left'},
                       {field:'成本核算',title:'成本核算方式',type:'int',bind:{ key:'成本核算方式',data:[]},width:80,align:'left'},
                       {field:'创建日期',title:'创建日期',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'修改日期',title:'最后入库时间',type:'datetime',width:160,align:'left',sort:true},
                       {field:'ID',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
